package com.example.lots_of_demo.controller;

import com.example.lots_of_demo.model.User;
import com.example.lots_of_demo.security.UserService;
import com.example.lots_of_demo.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @author : LZJ
 * @description : code for LZJ
 * @date : 2021/2/11
 */
@RestController
@RequestMapping("/user")
public class UserController extends BaseController{

    @Autowired
    private UserService userService;

    @PostMapping("/register")
    public R register(User user){
        return userService.register(user);
    }

}
